package com.jckl.foodathon.sqlite.dao;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.jckl.foodathon.sqlite.model.TB_Tables;
import com.jckl.foodathon.sqlite.model.TB_Brand;
import com.jckl.foodathon.sqlite.model.TB_Store;
import com.jckl.foodathon.sqlite.model.TB_Blogger;
import com.jckl.foodathon.sqlite.model.TB_Blog;

import com.jckl.foodathon.sqlite.dao.TB_TablesDao;
import com.jckl.foodathon.sqlite.dao.TB_BrandDao;
import com.jckl.foodathon.sqlite.dao.TB_StoreDao;
import com.jckl.foodathon.sqlite.dao.TB_BloggerDao;
import com.jckl.foodathon.sqlite.dao.TB_BlogDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig tB_TablesDaoConfig;
    private final DaoConfig tB_BrandDaoConfig;
    private final DaoConfig tB_StoreDaoConfig;
    private final DaoConfig tB_BloggerDaoConfig;
    private final DaoConfig tB_BlogDaoConfig;

    private final TB_TablesDao tB_TablesDao;
    private final TB_BrandDao tB_BrandDao;
    private final TB_StoreDao tB_StoreDao;
    private final TB_BloggerDao tB_BloggerDao;
    private final TB_BlogDao tB_BlogDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        tB_TablesDaoConfig = daoConfigMap.get(TB_TablesDao.class).clone();
        tB_TablesDaoConfig.initIdentityScope(type);

        tB_BrandDaoConfig = daoConfigMap.get(TB_BrandDao.class).clone();
        tB_BrandDaoConfig.initIdentityScope(type);

        tB_StoreDaoConfig = daoConfigMap.get(TB_StoreDao.class).clone();
        tB_StoreDaoConfig.initIdentityScope(type);

        tB_BloggerDaoConfig = daoConfigMap.get(TB_BloggerDao.class).clone();
        tB_BloggerDaoConfig.initIdentityScope(type);

        tB_BlogDaoConfig = daoConfigMap.get(TB_BlogDao.class).clone();
        tB_BlogDaoConfig.initIdentityScope(type);

        tB_TablesDao = new TB_TablesDao(tB_TablesDaoConfig, this);
        tB_BrandDao = new TB_BrandDao(tB_BrandDaoConfig, this);
        tB_StoreDao = new TB_StoreDao(tB_StoreDaoConfig, this);
        tB_BloggerDao = new TB_BloggerDao(tB_BloggerDaoConfig, this);
        tB_BlogDao = new TB_BlogDao(tB_BlogDaoConfig, this);

        registerDao(TB_Tables.class, tB_TablesDao);
        registerDao(TB_Brand.class, tB_BrandDao);
        registerDao(TB_Store.class, tB_StoreDao);
        registerDao(TB_Blogger.class, tB_BloggerDao);
        registerDao(TB_Blog.class, tB_BlogDao);
    }
    
    public void clear() {
        tB_TablesDaoConfig.getIdentityScope().clear();
        tB_BrandDaoConfig.getIdentityScope().clear();
        tB_StoreDaoConfig.getIdentityScope().clear();
        tB_BloggerDaoConfig.getIdentityScope().clear();
        tB_BlogDaoConfig.getIdentityScope().clear();
    }

    public TB_TablesDao getTB_TablesDao() {
        return tB_TablesDao;
    }

    public TB_BrandDao getTB_BrandDao() {
        return tB_BrandDao;
    }

    public TB_StoreDao getTB_StoreDao() {
        return tB_StoreDao;
    }

    public TB_BloggerDao getTB_BloggerDao() {
        return tB_BloggerDao;
    }

    public TB_BlogDao getTB_BlogDao() {
        return tB_BlogDao;
    }

}
